import { Type } from 'class-transformer'
import { IsDate, IsInt, IsNotEmpty, IsOptional } from 'class-validator'
import { ApiProperty } from '@nestjs/swagger'

export class CreateStudentClassDto {
  @ApiProperty({ description: '学生ID' })
  @IsInt()
  @IsNotEmpty()
  studentId: number

  @ApiProperty({ description: '班级ID' })
  @IsInt()
  @IsNotEmpty()
  classId: number

  @ApiProperty({ description: '加入班级时间', required: false })
  @IsOptional()
  @Type(() => Date)
  @IsDate()
  joinAt?: Date
} 